package com.reverie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.reverie.common.pojo.CommonPageReq;
import com.reverie.dto.req.ChartParam;
import com.reverie.dto.req.DisShippingParam;
import com.reverie.dto.req.MakeQueryParam;
import com.reverie.dto.req.OrderQueryParam;
import com.reverie.dto.resp.AnalysisData;
import com.reverie.dto.resp.StatisticModel;
import com.reverie.entity.OrderGoods;
import com.reverie.entity.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Rui.Zhou
 * @since 2024-02-03
 */
public interface IOrderInfoService extends IService<OrderInfo> {

    Page<OrderInfo> queryPage(CommonPageReq<OrderQueryParam> queryPageParam);

    List<OrderInfo> listByMemberIds(Collection<Integer> memberIds);

    AnalysisData analysis(OrderQueryParam queryPageParam);

    Boolean onSave(OrderInfo orderInfo);

    List<OrderGoods> queryProductMakeGoods(MakeQueryParam makeQueryParam);
    
    List<OrderInfo> selectMakeGoods(Integer startHour, Integer endHour);

    boolean updateMakeGood(Integer orderId, String goodsSn, String goodsAttr);

    List<StatisticModel> salesStatisticsByDateRange(OrderQueryParam queryPageParam);
    List<StatisticModel> salesStatisticsByDay(OrderQueryParam queryPageParam);

    Boolean allocation(DisShippingParam disShippingParam);

    List<Map> summaryForChart(ChartParam chartParam);

    List<OrderInfo> queryExportList(OrderQueryParam queryParam);
}
